home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
pascal
/
ghostbbs.zip
/
BEEP.INC
< prev
next >
Wrap
Text File
|
1985-07-06
|
920b
|
44 lines
procedure beep;
type
NoteRecord = record
C,CF,D,DF,E,F,FF,G,GF,A,AF,B: integer;
end;
const
Notes: NoteRecord =
(C:1;CF:2;D:3;DF:4;E:5;F:6;FF:7;G:8;GF:9;A:10;AF:11;B:12);
var
ch : char;
procedure Play(Octave,Note,Duration: integer);
var
Frequency : real;
I : integer;
begin
Frequency := 32.625;
for I := 1 to Octave do { Compute C in Octave }
Frequency := Frequency * 2;
for I := 1 to Note - 1 do { Increase frequency Note-1 times }
Frequency := Frequency * 1.059463094;
if Duration <> 0 then
begin
Sound(Round(Frequency));
Delay(Duration);
NoSound;
end
else Sound(Round(Frequency));
end;
procedure SoftAlarm;
var
I: integer;
begin
with Notes do
begin
Play(4,G,70);
Play(4,D,70);
end;
end;
begin
Softalarm;
end;